package junit.utils;

import io.jpress.JPressOptions;
import io.jpress.commons.utils.UrlUtils;
import org.junit.Assert;
import org.junit.Test;

public class UrlUtilsTester {

    @Test
    public void testGetUrl() {

        String url1 = UrlUtils.getUrl("/aaa/", 123, ".html");
        System.out.println(url1);
        Assert.assertEquals(url1, "/aaa/123.html");


        JPressOptions.setFlatUrlEnable(true);
        String url2 = UrlUtils.getUrl("/aaa/", 123, ".html");
        System.out.println(url2);
        Assert.assertEquals(url2, "/aaa-123.html");

    }

}
